const x: [string, number] = ['a', 1]
const y: [number, string] = [1, 'a']

// console.log(x === y) // false

let uk: unknown = 1
// unk.toFixed() //报错
// unknown需要进行类型缩小，否则对unknown变量进行除了逻辑操作外都会报错
if(typeof uk === 'number') {
  console.log(uk.toFixed(0));
}

const props : {
  id: number,
  name?: never
} = {
  id: 1
}


// props.name = ''
// props.name = 1
// props.name = false